//---------------------------------------------------------------------
// File: BizUnitTests.cs
// 
// Summary: 
//
// Author(s): Santosh Benjamin 
//            Gar MacCriosta
//  
//
//---------------------------------------------------------------------
// Copyright (c) 
//
// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
// KIND, WHETHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
// PURPOSE.
//---------------------------------------------------------------------

using NUnit.Framework;


namespace BizUnit.Extensions.BizTalk.Tests
{


    [TestFixture]
    public class BizTalkStepsXmlTests
    {
        /// <summary>
        /// The common setup for all tests. Runs the Test_Setup.xml file which copies the InDoc1.xml file
        /// from the source folder to the Rec_Setup folder. This is the same as the CoreTests
        /// </summary>
        [TestFixtureSetUp]
        public void SetUp()
        {

            //deploy the sdk sample here
            BizUnit bizUnit = new BizUnit(@".\..\..\TestCases\Test_Setup.xml", TestGroupPhase.TestGroupSetup);
            bizUnit.RunTest();
        }

        /// <summary>
        /// Common teardown step to delete the xml file from the Rec_Setup folder
        /// </summary>
        [TestFixtureTearDown]
        public void TearDown()
        {
            //undeploy the sdk sample here

            //BizUnit.
            //BizUnit bizUnit = new BizUnit(@".\..\..\TestCases\Test_TearDown.xml",BizUnit.TestGroupPhase.TestGroupTearDown);
            //bizUnit.RunTest();
        }

        /// <summary>
        /// This test checks the ApplicationConductor step
        /// </summary>
        [Test]
        public void ApplicationConductor()
        {

            BizUnit bizUnit = new BizUnit(@".\..\..\TestCases\ApplicationConductor.xml");
            bizUnit.RunTest();
        }

        /// <summary>
        /// This test checks the ApplicationGetStatus step
        /// </summary>
        [Test]
        public void ApplicationGetStatus()
        {
            BizUnit bizUnit = new BizUnit(@".\..\..\TestCases\ApplicationGetStatus.xml");
            bizUnit.RunTest();
        }

        [Test]
        public void ApplicationVerifyStatus()
        {
            BizUnit bizUnit = new BizUnit(@".\..\..\TestCases\ApplicationVerifyStatus.xml");
            bizUnit.RunTest();
        }


        /// <summary>
        /// This test stops and starts an existing orchestration.
        /// It requires that the SDK sample Hello World be deployed
        /// </summary>
        [Test]
        public void OrchestrationConductorExStep()
        {
            BizUnit bizUnit = new BizUnit(@".\..\..\TestCases\OrchestrationConductorEx.xml");
            bizUnit.RunTest();
        }

        /// <summary>
        /// This test disables and enables a receive location with a 5 second delay in between
        /// It requires that the SDK Sample for Messaging-CBR be deployed
        /// </summary>
        [Test]
        public void ReceiveLocationConductorStep()
        {
            BizUnit bizUnit = new BizUnit(@".\..\..\TestCases\ReceiveLocationConductor.xml");
            bizUnit.RunTest();
        }


        /// <summary>
        /// This test gets the status of a receive location
        /// It requires that the SDK Sample for Messaging-CBR be deployed
        /// </summary>
        [Test]
        public void ReceiveLocationGetStatus()
        {
            BizUnit bizUnit = new BizUnit(@".\..\..\TestCases\ReceiveLocationGetStatus.xml");
            bizUnit.RunTest();
        }

        [Test]
        public void ReceiveLocationVerifyStatus()
        {
            BizUnit bizUnit = new BizUnit(@".\..\..\TestCases\ReceiveLocationVerifyStatus.xml");
            bizUnit.RunTest();
        }

        [Test]
        public void ReceivePortConductor()
        {
            BizUnit bizUnit = new BizUnit(@".\..\..\TestCases\ReceivePortConductor.xml");
            bizUnit.RunTest();
        }

        /// <summary>
        /// This test checks the SendPortConductor step. Requires the CBR Sample to be deployed
        /// </summary>
        [Test]
        public void SendPortConductorStep()
        {
            BizUnit bizUnit = new BizUnit(@".\..\..\TestCases\SendPortConductor.xml");
            bizUnit.RunTest();
        }

        /// <summary>
        /// This test checks the SendPortGetStatus step
        /// </summary>
        [Test]
        public void SendPortGetStatus()
        {
            BizUnit bizUnit = new BizUnit(@".\..\..\TestCases\SendPortGetStatus.xml");
            bizUnit.RunTest();
        }


        /// <summary>
        /// This test checks the SendPortStarted step
        /// </summary>
        [Test]
        public void SendPortVerifyStatus()
        {
            BizUnit bizUnit = new BizUnit(@".\..\..\TestCases\SendPortVerifyStatus.xml");
            bizUnit.RunTest();
        }


        /// <summary>
        /// This test checks the MapExecutingStep step
        /// </summary> 
        [Test]
        public void ExecuteMap()
        {
            BizUnit bizUnit = new BizUnit(@".\..\..\TestCases\MapExecuting.xml");
            bizUnit.RunTest();
        }


    }

}
